# Contributor: Oleg Titov <oleg.titov@gmail.com>
# Maintainer: Oleg Titov <oleg.titov@gmail.com>
pkgname=py3-spacy
pkgver=2.3.2
pkgrel=0
pkgdesc="Industrial-strength Natural Language Processing (NLP)"
url="https://spacy.io/"
arch="x86_64" # limited by py3-blis as it has highly optimized routines for x86_64 only
	      # and py3-srsly as it does not pass tests for x86 and aarch64, reported upstream
license="MIT"
depends="
	python3
	py3-numpy
	py3-jsonschema
	py3-thinc
	py3-srsly
	py3-tqdm
	py3-wasabi
	py3-pyrsistent
	py3-plac
	py3-catalogue
	"
makedepends="python3-dev py3-setuptools cython py3-requests"
checkdepends="py3-pytest py3-pytest-timeout py3-mock py3-flake8"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/explosion/spaCy/archive/v$pkgver.tar.gz"
builddir=$srcdir/spaCy-$pkgver

build() {
	python3 setup.py build_ext --inplace
}

check() {
	pytest-3 spacy
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"

	install -Dm644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md"
}

sha512sums="48ad852a68c5f348f08bd1406936722ad45b850b61c33b8e6647c861856ffef387d85fbda978f4b3a1205774926a60c02cb4250bb2e38f74959f932201324abd  py3-spacy-2.3.2.tar.gz"
